//
//  AViewController.m
//  Saoyisao_Test
//
//  Created by Adiljan on 2016/11/1.
//  Copyright © 2016年 Adiljan. All rights reserved.
//

#import "AViewController.h"
#import "ADScanViewController.h"
#import "CViewController.h"


@interface AViewController ()

@end

@implementation AViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)btnClick:(id)sender {
//    [self cv];
    [self qqStyle];
}
 -(void)cv{
        CViewController *cv = [[CViewController alloc]initWithNibName:@"CViewController" bundle:nil];
        [self.navigationController pushViewController:cv animated:YES];
}
 - (void)qqStyle
    {
        //设置扫码区域参数设置
        
        //创建参数对象
        LBXScanViewStyle *style = [[LBXScanViewStyle alloc]init];
        
        //矩形区域中心上移，默认中心点为屏幕中心点
        style.centerUpOffset = 44;
        
        //扫码框周围4个角的类型,设置为外挂式
        style.photoframeAngleStyle = LBXScanViewPhotoframeAngleStyle_Inner;
        
        //扫码框周围4个角绘制的线条宽度
        style.photoframeLineW = 6;
        
        //扫码框周围4个角的宽度
        style.photoframeAngleW = 24;
        
        //扫码框周围4个角的高度
        style.photoframeAngleH = 24;
        
        //扫码框内 动画类型 --线条上下移动
        style.anmiationStyle = LBXScanViewAnimationStyle_LineMove;
        
        //是否需要绘制扫码矩形框
        style.isNeedShowRetangle = NO;
        
        //线条上下移动图片
        style.animationImage = [UIImage imageNamed:@"qrcode_scan_light_green"];
        
        //ADScanViewController继承自LBXScanViewController
        //添加一些扫码或相册结果处理
        ADScanViewController *vc = [ADScanViewController new];
        vc.style = style;
        
        vc.isQQSimulator = YES;
        vc.isVideoZoom = YES;
        [self.navigationController pushViewController:vc animated:YES];
    }
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
